package com.hss.springboot2.config;

import com.hss.springboot2.servlet.TestServlet;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/*
//test1
@Configuration
public class ServletConfig {
    @Bean
    public ServletRegistrationBean  servletRegistrationBean(){
        return new ServletRegistrationBean<>(new TestServlet(),"/test");
    }
}*/

@Configuration
@ServletComponentScan
public class ServletConfig {
//    @Bean
//    public ServletRegistrationBean  servletRegistrationBean(){
//        return new ServletRegistrationBean<>(new TestServlet(),"/test");
//    }
}
